package com.zhuanzhuan.hero.user.vo;

import com.zhuanzhuan.youpin.common.utils.DateUtils;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;
import java.util.Objects;

/**
 * @ClassName UserListItemVO
 * @Description  隐私设置列表、访客记录列表、靠谱列表使用
 * @Author hanjunjun
 * @Date 2024/7/1 20:06
 */
@Data
@Accessors(chain = true)
public class UserListItemVO {

    private Long id;

    private String createTime;

    /**
     * 隐私设置是否已设置
     */
    private Integer switchState;

    /**
     * 不靠谱理由
     */
    private String reason;

    /**
     * 上传照片
     */
    private List<String> pics;

    private UserItemBriefVO userInfo;

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public void setCreateTime(Date createTime) {
        if (Objects.isNull(createTime)) {
            return;
        }
        this.createTime = DateUtils.formatDate(createTime, DateUtils.PATTERN);
    }
}
